path_cur=$(dirname $0)

cd $path_cur

export NPU_HOST_LIB=/usr/local/Ascend/ascend-toolkit/7.0.0/runtime/lib64/
export NPU_HOST_INC=/usr/local/Ascend/ascend-toolkit/7.0.0/runtime/include/

rm -rf build
rm -rf results
mkdir -p build
mkdir -p results
cd build


cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++
make -j4 || {
    ret=$?
    echo "Failed to build"
    exit ${ret}
}